<?php

	require_once("../Database.php");
	require_once("TestUsers.php");
	require_once("TestArticles.php");
	require_once("TestComments.php");
	
	class Tests{
		
		public $db;
		public $testUsers;
		public $testArticles;
		public $testComments;
		
		public function __construct(){
			$this->db = new Database();
			$this->testUsers = new TestUsers($this->db);
			$this->testArticles = new TestArticles($this->db);
			$this->testComments = new TestComments($this->db);
		}
		
	}


	// --------------------
	//  Main
	// --------------------
	$tests = new Tests();
	
	print("<h2>Users</h2>");
	$tests->testUsers->test_getUsers(); 
	$tests->testUsers->test_getUser("renaud", "renaud");
	
	print("<h2>Articles</h2>");
	$tests->testArticles->test_getArticles();
	
	print("<h2>Comments</h2>");
	$tests->testComments->test_getCommentsByNode(1);
	$tests->testComments->test_getCommentsByAuthor(1);
?>